/**
 * @Author lilinjie
 * @Description: 通用表单hook
*/

import { reactive } from 'vue'

export function useForm({ defaultFilterForm }) {
  const filterForm = reactive({ ...defaultFilterForm })

  function clearForm() {
    // 初始化表单
    Object.assign(filterForm, defaultFilterForm)
    console.log('clearForm', filterForm, defaultFilterForm)
  }

  return { filterForm, clearForm }
}
